package com.itheima.d6_abstract;

public class AbstractDemo1 {
    public static double PER_OIL_PRICE = 7.5;
    //认识抽象类并使用
    public static void main(String[] args) {

        Card goldCard = new GoldenCard();
        double oilPrice = PER_OIL_PRICE * 6;
        goldCard.setMoney(10000.0);
        goldCard.setUserName("彭雪峰");
        goldCard.pay(oilPrice);
        System.out.println("====================");
        Card silverCard = new SilverCard();
        silverCard.setMoney(5000.0);
        silverCard.setUserName("小红");
        silverCard.pay(oilPrice);

    }
}
